import request from '@/utils/request'

export function getList(params) {
  return request({
    url: '/admin/article',
    method: 'get',
    params
  })
}

export function del(id) {
  return request({
    url: '/admin/article/' + id,
    method: 'delete'
  })
}

export function add(params) {
  return request({
    url: '/admin/article',
    method: 'post',
    params
  })
}

export function edit(params) {
  return request({
    url: '/admin/article/' + params.id,
    method: 'put',
    params
  })
}

export function info(id) {
  return request({
    url: '/admin/article/' + id,
    method: 'get'
  })
}

